package com.recordhistory;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
//如果mybatis中service实现类中加入事务注解，需要此处添加该注解 同于xml配置方式的 <tx:annotation-driven />
@EnableTransactionManagement
//扫描dao层，自动的mapper扫描,多个用逗号分隔
@MapperScan("com.recordhistory.dao")
//public class RecordhistoryApplication extends SpringBootServletInitializer {
//
//    public static void main(String[] args) {
//        SpringApplication.run(RecordhistoryApplication.class, args);
//    }
//
//    @Override
//    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
//        return builder.sources(RecordhistoryApplication.class);
//    }
//}
public class RecordhistoryApplication {

    public static void main(String[] args) {
        SpringApplication.run(RecordhistoryApplication.class, args);
    }


}
